<div class="modal-content">
    <div class="modal-header modal-header-color">
        <button type="button" class="close" data-dismiss="modal"
                aria-label="Close" ng-click="cancel()">
            <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title" id="myModalLabel">{{'新增'|translate}}</h4>
    </div>
    <div class="modal-body">
        <!--内容-->
        <div class="body-header">

            <form class="form-inline">
                <div class="row">
                    <div class="col-md-5  btn-mr-5">
                        <!--<button type="button" class="btn btn-danger btn-xs"><i class="iconfont icon-tijiao"></i>提交
                        </button>-->
                        <button type="button" class="btn  btn-danger btn-xs" one-click="save()"><i
                                class="iconfont icon-baocun-copy"></i>{{'保存'|translate}}
                        </button>
                    </div>
                </div>
            </form>
        </div>
        <form role="form" name = "myForm"  novalidate>
            <div class="row">
                <div class="col-md-3">
                    <div class="form-group">
                        <label for="code"><i class="text-danger">*</i>{{'编码'|translate}}</label>
                        <input type="text" class="form-control input-sm" name="code" id="code"
                               ng-model="model.ORGANISATION_CODE" required >
                        <!--<span style="color:red" ng-if="myForm.code.$error.required&&myForm.code.$touched">
                            {{'编码不能为空!'|translate}}
                        </span>-->
                    </div>
                </div>
                <div class="col-md-3">
                    <div class="form-group">
                        <label for="name"><i class="text-danger">*</i>名称</label>
                        <input type="text" class="form-control input-sm" name="nameCN" id="name"
                               ng-model="model.ORGANISATION_NAME_CN" required >
                        <!--<span style="color:red" ng-if="myForm.nameCN.$error.required&&myForm.nameCN.$touched">
                            名称不能为空！
                        </span>-->
                    </div>
                </div>
                <div class="col-md-3">
                    <div class="form-group">
                        <label for="contact">{{'联系人'|translate}}</label>
                        <input type="text" class="form-control input-sm" id="contact" ng-model="model.CONTACT" >
                    </div>
                </div>
                <div class="col-md-3">
                    <div class="form-group">
                        <label >{{'联系电话'|translate}}</label>
                            <input type="text" class="form-control input-sm"  ng-model="model.PHONE">
                        <!--<span style="color:red" ng-if="myForm.phone.$error.maxlength && myForm.phone.$touched">
                            {{'请输入有效手机号!'|translate}}
                        </span>-->
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-3">
                    <div class="form-group">
                        <label for="formId"><i class="text-danger">*</i>{{'形态'|translate}}</label>
                        <select class="form-control input-sm" id="formId" name="form"
                                ng-model="model.ORGANISATION_FORM_ID"
                                ng-options="value.D_VALUE as value.D_NAME_CN for value in model.orgFormList" required >
                        </select>
                        <!--<span style="color:red" ng-if="myForm.form.$error.required&&myForm.form.$touched">
                            {{'形态不能为空!'|translate}}
                        </span>-->
                    </div>
                </div>
                <div class="col-md-3">
                    <div class="form-group">
                        <label for="fax">{{'传真'|translate}}</label>
                        <input type="text" name ="FAX" id="fax" class="form-control input-sm" ng-model="model.FAX" >
                    </div>
                </div>
                <div class="col-md-3">
                    <div class="form-group">
                        <label for="reportName"><i class="text-danger">*</i>{{'报表用名'|translate}}</label>
                        <input type="text" class="form-control input-sm" id="reportName" name="reportName" ng-model="model.ORGANISATION_NAME_EN" required >
                        <!--<span style="color:red" ng-if="myForm.reportName.$error.required && myForm.reportName.$touched">
                            {{'报表用名不能为空！'|translate}}
                        </span>-->
                    </div>
                </div>
                <div class="col-md-3">
                    <div class="form-group">
                        <div class="checkbox checkbox-info checkbox-inline" style = "margin-top:5%">
                            <input type="checkbox" class="styled" id="HEADER_STATE" ng-checked="check" ng-model="model.HEADER_STATE" >
                            <label for="HEADER_STATE">{{'报表用名是否显示于采购订单PDF页眉处'|translate}}</label>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-3">
                    <div class="form-group">
                        <label for="AREA_ID"><i class="text-danger">*</i>{{'地区'|translate}}</label>
                        <select class="form-control input-sm" id="AREA_ID" name="AREA_ID" ng-model="model.AREA_ID"
                                ng-change="changeSelect(model.AREA_ID)"
                                ng-options="value.AREA_ID as value.AREA_NAME_CN for value in model.addressList" required></select>
                        <!--<span style="color:red" ng-if="myForm.AREA_ID.$error.required && myForm.AREA_ID.$touched">
                            {{'地区不能为空！'|translate}}
                        </span>-->
                    </div>
                </div>
                <div class="col-md-3">
                    <div class="form-group">
                        <label for="COUNTRY_ID"><i class="text-danger">*</i>{{'国家'|translate}}</label>
                        <select class="form-control input-sm" name="country" id="COUNTRY_ID" ng-model="model.COUNTRY_ID"
                                ng-options="value.AREA_ID as value.AREA_NAME_CN for value in model.addressList2" required >
                        </select>
                        <!--<span style="color:red" ng-if="myForm.country.$error.required && myForm.country.$touched">
                            {{'国家不能为空！'|translate}}
                        </span>-->
                    </div>
                </div>
                <div class="col-md-3">
                    <div class="form-group">
                        <label for="postcode">{{'税率'|translate}}</label>
                        <input type="text" class="form-control input-sm text-right" id="postcode" ng-model="model.TARIFF">
                    </div>
                </div>
                <div class="col-md-3">
                    <div class="form-group">
                        <label for="organisation_state">{{'是否启用'|translate}}</label>
                        <select class="form-control input-sm" name ="state" id="organisation_state" ng-disabled="true"
                                ng-model="model.ORGANISATION_STATE" ng-options="value.D_VALUE as value.D_NAME_CN for value in model.stateList">
                        </select>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-3">
                    <div class="form-group">
                        <label>{{'业务伙伴'|translate}}</label>
                        <div class="input-group" style="width: 100%">
                            <input type="text" class="form-control input-sm" style="width: 75%" ng-model="model.PARTNER_NAME">
                            <span class="input-group-btn" style="display: inline-block;width: 25%">
                                 <button style="height: 30px;width:100%;" type="button" class="btn btn-danger btn-xs" ng-click="searchPartner()"><i class="iconfont icon-sousuo_sousuo"></i>{{'选择'|translate}}</button>
                              </span>
                        </div>
                    </div>
                </div>
                <div class="col-md-3">
                    <div class="form-group">
                        <label for="address">{{'详细地址'|translate}}</label>
                        <input type="text" class="form-control input-sm" id="address" ng-model="model.ADDRESS" >
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-6">
                    <div class="form-group">
                        <label for="remarks">{{'描述'|translate}}</label>
                        <input type="text" class="form-control input-sm" id="remarks" ng-model="model.ORGANISATION_REMARKS" >
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-5">
                    <div class="page-header orange">
                        <h4>{{'组织分类'|translate}}</h4>
                    </div>
                    <div>
                        <label >{{'核算组织'|translate}}</label>
                        <div class="row" style="margin-left: 25px">
                            <div class="checkbox checkbox-info checkbox-inline" ng-repeat="item in model.accOrgList">
                                <input type="checkbox"  class="styled" ng-model = "item.isChecked" ng-click="accSelect(item.D_VALUE,$event)" ng-disabled="item.isDisable">
                                <label >{{item.D_NAME_CN}}</label>
                            </div>

                        </div>
                        <label >{{'业务组织'|translate}}</label>
                        <div class="row" style="margin-left: 25px">
                            <div class="checkbox checkbox-info checkbox-inline" ng-repeat ="item in model.busOrgList" >
                                <input type="checkbox" class="styled" ng-model="item.isChecked" ng-click="businessSelect(item.D_VALUE,$event)"  >
                                <label >{{item.D_NAME_CN}}</label>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-2" ng-if="model.isShow">
                    <div class="page-header orange">
                        <h4>{{'所属核算组织'|translate}}</h4>
                    </div>
                    <div class="form-group">
                        <label>{{'所属法人'|translate}}</label>
                        <select class="form-control input-sm" ng-model="model.ORGANISATIONOT_ID"
                                ng-options="value.ORGANISATION_ID as value.ORGANISATION_NAME_CN for value in model.legalList "></select>
                    </div>
                </div>
                <div class="col-md-5" ng-if="model.ORGANISATION_FORM_ID ==1">
                    <div class="page-header orange">
                        <h4>{{'分组信息'|translate}}</h4>
                    </div>
                    <div>
                        <button class="btn border-text-green btn-xs" ng-click="addGroup()"><i
                                class="iconfont icon-jia1 "></i></button>
                        <button class="btn border-text-orange btn-xs" ng-click="moveGroup()"><i
                                class="iconfont icon-jian "></i></button>
                    </div>
                    <div class="box-body" auto-height="groupGridOption" style="margin-left: -10px">
                        <div ui-grid="groupGridOption"     ui-grid-edit ui-grid-pagination ui-grid-row-edit ui-grid-cellNav  ui-grid-selection
                             ui-grid-resize-columns ui-grid-auto-resize></div>
                    </div>
                    <!--<div class="box-body" auto-height="groupGridOption">
                        <div ui-grid="groupGridOption"     ui-grid-edit ui-grid-pagination ui-grid-row-edit ui-grid-cellNav  ui-grid-selection
                             ui-grid-resize-columns ui-grid-auto-resize></div>
                    </div>-->
                    <!--<div>
                        <div ui-grid="groupGridOption"  style="height:20vh" ui-grid-edit  ui-grid-selection ui-grid-exporter ui-grid-row-edit
                             ui-grid-resize-columns ui-grid-auto-resize></div>
                    </div>-->
                </div>
            </div>
        </form>
    </div>
</div>
<style>

    .checkbox-header-bold label {
        font-weight: bold;
    }

</style>





